﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication2
{
    public partial class menuAdmin : Form
    {
        GestiónAcademia ges = new GestiónAcademia();
        public menuAdmin()
        {
            InitializeComponent();
        }

        private void menuAdmin_Load(object sender, EventArgs e)
        {            
            int idperfil = ges.idPerfilRut(login.rutC);            
            if (idperfil == 2)
            {
                btpagos.Visible = false;
                labelPago.Visible = false;
            }
        }

        private void label5_Click(object sender, EventArgs e)
        {
            DialogResult boton = MessageBox.Show("¿Está seguro que desea cerrar su sesión?", "Advertencia", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
            if (boton == DialogResult.Yes)
            {
                this.Close();
                login log = new login();
                log.Show();

            }
            else
            {
            }//boton cancelar
            //regresar al winForm
        }

        private void label6_Click(object sender, EventArgs e)
        {
            DialogResult boton = MessageBox.Show("¿Está seguro que desea cerrar su sesión?", "Advertencia", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
            if (boton == DialogResult.Yes)
            {
                this.Close();
                login log = new login();
                log.Show();

            }
            else
            {
            }//boton cancelar
            //regresar al winForm
        }

        private void btpagos_Click(object sender, EventArgs e)
        {
            verPagos p = new verPagos();
            p.WindowState = FormWindowState.Maximized;
            p.ShowDialog();
        }

        private void btinventario_Click(object sender, EventArgs e)
        {
            inventario i = new inventario();
            i.WindowState = FormWindowState.Maximized;
            i.ShowDialog();
        }

        private void btalumno_Click(object sender, EventArgs e)
        {
            estudiante es = new estudiante();
            es.ShowDialog();
        }

        private void btcrearuser_Click(object sender, EventArgs e)
        {
            creauser cu = new creauser();
            cu.ShowDialog();
        }

        private void labelAcerca_Click(object sender, EventArgs e)
        {
            AboutBox1 acerca = new AboutBox1();
            acerca.ShowDialog();
            //acerca.MdiParent = this; 
        }

        private void button1_Click(object sender, EventArgs e)
        {
            DialogResult boton = MessageBox.Show("¿Está seguro que desea cerrar su sesión?", "Advertencia", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
            if (boton == DialogResult.Yes)
            {
                this.Close();
                login log = new login();
                log.Show();

            }
            else
            {
            }//boton cancelar
            //regresar al winForm
        }

        private void button2_MouseClick(object sender, MouseEventArgs e)
        {
            System.Diagnostics.Process.Start("http://it-assistant.tk/index.html");
            
        }

        private void button2_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://it-assistant.tk/index.html");
        }

        private void button2_MouseHover(object sender, EventArgs e)
        {
            tipAyuda.Show("Ir a: http://it-assistant.tk/index.html", btlink);
        }

    }
}
